﻿<div ng-controller="agentCustomerController">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default"
                           data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    </div>
                    <h4 class="panel-title">经办人审核</h4>
                </div>
                <div class="panel-body">
                    <div class="form-inline filter-option">
                        <div class="row">
                            <div class="col-md-12">
                                <!--<div class="pull-left">
                                    <button class="btn btn-info" ng-click="exportExcel()">信息导出（Excel）</button>
                                </div>-->
                                <div class="pull-right">
                                    <span>
                                        <input type="radio" name="checked" id="unchecked" value="0"
                                               ng-model="filter.checkedType" ng-change="reflash()"> 未审核
                                        <input type="radio" name="checked" id="checked" value="1"
                                               ng-model="filter.checkedType" ng-change="reflash()"> 已审核
                                    </span>
                                    <button class="btn btn-sm btn-info" ng-click="reflash()">
                                        <i class="fa fa-search"></i> 筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div>
                        <table id="data-table" ng-table="tableParams" template-pagination="template/pagination.html"
                               class="table table-striped table-bordered table-hover table-condensed">
                            <tr ng-repeat="item in $data">
                                <td data-title="'序号'" width="10%" class="text-center">{{ first + $index }}</td>
                                <td data-title="'姓名'" class="text-center">{{ item.agent_treasurer_name }}</td>
                                <td data-title="'手机号'" class="text-center">{{ item.agent_treasurer_phone }}</td>
                                <td data-title="'身份证号'" class="text-center">{{ item.agent_treasurer_cert_no}}</td>
                                <td data-title="'企业编号'" class="text-center">{{ item.corp_id}}</td>
                                <td data-title="'企业名称'" class="text-center">{{ item.enterprise_name}}</td>
                                <td data-title="'企业授权'" ng-if="filter.checkedType==1" class="text-center">{{ item.authorization_cert_status == '1' ? '成功' : '失败'}}</td>
                                <td data-title="'单位授权'" ng-if="filter.checkedType==1" class="text-center">{{ item.enterprise_proxy_status == '1' ? '成功' : '失败'}}</td>

                                <td class="text-center width-100 text-nowrap">
                                    <button class="btn btn-info btn-xs" ng-click="check(item)"
                                            ng-if="filter.checkedType==0">
                                        <i class="fa fa-edit"></i> 审核
                                    </button>
                                    <button class="btn btn-info btn-xs" ng-click="read(item)"
                                            ng-if="filter.checkedType==1">
                                        <i class="fa fa-edit"></i> 详细
                                    </button>
                                    <button class="btn btn-info btn-xs" ng-click="editAgent(item)"
                                            ng-if="filter.checkedType==1">
                                        <i class="fa fa-edit"></i> 修改
                                    </button>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="modal fade" id="modal-read">
                    <div class="modal-dialog" style="width:1100px">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>经办人详情</h4>
                            </div>
                            <div class="modal-body">
                                <div class="form-horizontal">
                                    <ng-form name="editForm" novalidate>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人姓名: </label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.agent_treasurer_name }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人手机号: </label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.agent_treasurer_phone }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人身份证号: </label>
                                            <div class="col-md-4 form-control-static">
                                                {{model.agent_treasurer_cert_no}}
                                            </div>
                                        </div>
                                        <hr />
                                        <div class="form-group width-full" ng-if="(model.agent_treasurer_cert_photo_front_id != 0 && model.agent_treasurer_cert_photo_back_id != 0) || model.agent_treasurer_cert_photo_front_id != '' && model.agent_treasurer_cert_photo_back_id != ''">
                                            <div class="form-group width-full">
                                                <div class="col-sm-4 form-control-static ">
                                                    <label class="control-label">经办人身份证正面: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="jqzoom"
                                                             src="{{model.agent_treasurer_cert_photo_front_address}}"
                                                             rel="{{model.agent_treasurer_cert_photo_front_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="col-sm-4 form-control-static">
                                                    <label class="control-label">经办人身份证反面: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="jqzoom"
                                                             src="{{model.agent_treasurer_cert_photo_back_address}}"
                                                             rel="{{model.agent_treasurer_cert_photo_back_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        </div>
                                        <div class="form-group width-full" ng-if="model.agent_treasurer_cert_photo_front_id == 0 || model.agent_treasurer_cert_photo_front_id == '' || model.agent_treasurer_cert_photo_back_id == 0 || model.agent_treasurer_cert_photo_back_id == ''">
                                            <div class="form-group width-full">
                                                <div class="col-sm-4 form-control-static ">
                                                    <label class="control-label">单位授权书: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="jqzoom"
                                                             src="{{model.authorization_xingyebank_photo_address}}"
                                                             rel="{{model.authorization_xingyebank_photo_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="col-sm-4 form-control-static">
                                                    <label class="control-label">企业授权书: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="jqzoom"
                                                             src="{{model.authorization_xingyeshujin_photo_address}}"
                                                             rel="{{model.authorization_xingyeshujin_photo_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        </div>
                                    </ng-form>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-sm btn-white" data-dismiss="modal">
                                    <i class="fa fa-share-square-o"></i> 关闭
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal fade" id="modal-edit">
                    <div class="modal-dialog" style="width:1100px">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>经办人详情</h4>
                            </div>
                            <div class="modal-body">
                                <div class="form-horizontal">
                                    <ng-form name="editForm" novalidate>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人姓名: </label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.agent_treasurer_name }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人手机号: </label>
                                            <div class="col-md-4 form-control-static">
                                                {{ model.agent_treasurer_phone }}
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人身份证号: </label>
                                            <div class="col-md-4 form-control-static">
                                                {{model.agent_treasurer_cert_no}}
                                            </div>
                                        </div>
                                        <hr />
                                        <div class="form-group width-full" ng-if="(model.agent_treasurer_cert_photo_front_id != 0 && model.agent_treasurer_cert_photo_back_id != 0) || model.agent_treasurer_cert_photo_front_id != '' && model.agent_treasurer_cert_photo_back_id != ''">
                                            <div class="form-group width-full">
                                                <div class="col-sm-4 form-control-static ">
                                                    <label class="control-label">经办人身份证正面: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="edit-jqzoom"
                                                             src="{{model.agent_treasurer_cert_photo_front_address}}"
                                                             rel="{{model.agent_treasurer_cert_photo_front_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="col-sm-4 form-control-static">
                                                    <label class="control-label">经办人身份证反面: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="edit-jqzoom"
                                                             src="{{model.agent_treasurer_cert_photo_back_address}}"
                                                             rel="{{model.agent_treasurer_cert_photo_back_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        </div>
                                        <div class="form-group width-full" ng-if="model.agent_treasurer_cert_photo_front_id == 0 || model.agent_treasurer_cert_photo_front_id == '' || model.agent_treasurer_cert_photo_back_id == 0 || model.agent_treasurer_cert_photo_back_id == ''">
                                            <div class="form-group width-full">
                                                <div class="col-sm-4 form-control-static ">
                                                    <label class="control-label">单位授权书: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="edit-jqzoom"
                                                             src="{{model.authorization_xingyebank_photo_address}}"
                                                             rel="{{model.authorization_xingyebank_photo_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="col-sm-4 form-control-static">
                                                    <label class="control-label">企业授权书: </label>
                                                    <div class="tb-booth tb-pic tb-s250">
                                                        <img class="edit-jqzoom"
                                                             src="{{model.authorization_xingyeshujin_photo_address}}"
                                                             rel="{{model.authorization_xingyeshujin_photo_address}}"
                                                             alt="图片不存在" />
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        </div>
                                        <hr />
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">审核备注：</label>
                                            <div class="col-md-10">
                                                <textarea class="form-control" ng-model="model.verify_description"
                                                          rows="4"></textarea>
                                            </div>
                                        </div>
                                    </ng-form>
                                </div>
                            </div>
                            <div class="modal-footer">

                                <button type="button" class="btn btn-sm btn-success" ng-click="pass()"
                                        ng-disabled="editForm.$invalid">
                                    <i class="fa fa-save"></i> 通过
                                </button>
                                <button type="button" class="btn btn-sm btn-danger" ng-click="reject()"
                                        ng-disabled="editForm.$invalid">
                                    <i class="fa fa-save"></i> 不通过
                                </button>

                                <button type="button" class="btn btn-sm btn-white" data-dismiss="modal">
                                    <i class="fa fa-share-square-o"></i> 关闭
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <!--修改经办人信息弹窗-->
                <div class="modal fade" id="modal-editAgent">
                    <div class="modal-dialog" style="width:1100px">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>经办人详情</h4>
                            </div>
                            <div class="modal-body">
                                <div class="form-horizontal">
                                    <ng-form name="editForm" novalidate>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人姓名: </label>
                                            <div class="col-md-4 form-control-static">
                                                <input type="text" class="form-control" ng-model="model.agent_treasurer_name" required>
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人手机号: </label>
                                            <div class="col-md-4 form-control-static">
                                                <input type="text" class="form-control" ng-model="model.agent_treasurer_phone" required>
                                            </div>
                                        </div>
                                        <div class="form-group width-full">
                                            <label class="col-md-2 control-label">经办人身份证号: </label>
                                            <div class="col-md-4 form-control-static">
                                                <input type="text" class="form-control" ng-model="model.agent_treasurer_cert_no" required>
                                            </div>
                                        </div>
                                        <hr />
                                        <div class="form-group width-full" ng-if="model.agent_treasurer_cert_photo_front_id == 0 || model.agent_treasurer_cert_photo_front_id == '' || model.agent_treasurer_cert_photo_back_id == 0 || model.agent_treasurer_cert_photo_back_id == ''">
                                            <div class="form-group width-full">
                                                <div class="col-sm-4 form-control-static ">
                                                    <label class="control-label">单位授权书: </label>
                                                    <div class="tb-booth tb-pic tb-s250" ngf-select="uploadFiles($files, $invalidFiles, setxingyebankID,0)" ngf-pattern="'image/*'" accept="image/*" ngf-max-size="10MB">
                                                        <img class="jqzoom_back"
                                                             src="{{model.authorization_xingyebank_photo_address}}"
                                                             rel="{{model.authorization_xingyebank_photo_address}}"
                                                             alt="授权书背面图片不存在" />
                                                    </div>
                                                    <div class="col-md-1 col-xs-12 text-center" ng-click="removeFront()" style="margin-top: -70%;margin-left: 87%;font-size: 25px;color: #f00;">
                                                        X
                                                    </div>
                                                </div>
                                                <div class="col-sm-4 form-control-static">
                                                    <label class="control-label">企业授权书: </label>
                                                    <div class="tb-booth tb-pic tb-s250" ngf-select="uploadFiles($files, $invalidFiles, setxingyeshujinID,1)" ngf-pattern="'image/*'" accept="image/*" ngf-max-size="10MB">
                                                        <img class="jqzoom_front"
                                                             src="{{model.authorization_xingyeshujin_photo_address}}"
                                                             rel="{{model.authorization_xingyeshujin_photo_address}}"
                                                             alt="授权书正面图片不存在" />
                                                    </div>
                                                    <div class="col-md-1 col-xs-12 text-center" ng-click="removeBank()" style="margin-top: -70%;margin-left: 87%;font-size: 25px;color: #f00;">                                            
                                                        X
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        </div>
                                        <div class="form-group width-full" ng-if="(model.agent_treasurer_cert_photo_front_id != 0 && model.agent_treasurer_cert_photo_back_id != 0) || model.agent_treasurer_cert_photo_front_id != '' && model.agent_treasurer_cert_photo_back_id != ''">
                                            <div class="form-group width-full">
                                                <div class="col-sm-4 form-control-static ">
                                                    <label class="control-label">经办人身份证正面: </label>
                                                    <div class="tb-booth tb-pic tb-s250" ngf-select="uploadFiles($files, $invalidFiles, certFrontID,2)" ngf-pattern="'image/*'" accept="image/*" ngf-max-size="10MB">
                                                        <img class="jqzoom_back"
                                                             src="{{model.agent_treasurer_cert_photo_front_address}}"
                                                             rel="{{model.agent_treasurer_cert_photo_front_address}}"
                                                             alt="授权书背面图片不存在" />
                                                    </div>
                                                    <div class="col-md-1 col-xs-12 text-center" ng-click="removeCarFront()" style="margin-top: -70%;margin-left: 87%;font-size: 25px;color: #f00;">
                                                        X
                                                    </div>
                                                </div>
                                                <div class="col-sm-4 form-control-static">
                                                    <label class="control-label">经办人身份证反面: </label>
                                                    <div class="tb-booth tb-pic tb-s250" ngf-select="uploadFiles($files, $invalidFiles, certBackID,3)" ngf-pattern="'image/*'" accept="image/*" ngf-max-size="10MB">
                                                        <img class="jqzoom_front"
                                                             src="{{model.agent_treasurer_cert_photo_back_address}}"
                                                             rel="{{model.agent_treasurer_cert_photo_back_address}}"
                                                             alt="授权书正面图片不存在" />
                                                    </div>
                                                    <div class="col-md-1 col-xs-12 text-center" ng-click="removeCarBack()" style="margin-top: -70%;margin-left: 87%;font-size: 25px;color: #f00;">
                                                        X
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        </div>
                                        <hr />
                                        <div class="form-group width-full">
                                            <label class="control-label col-md-2">修改备注：</label>
                                            <div class="col-md-10">
                                                <textarea class="form-control" ng-model="model.verify_description"
                                                          rows="4"></textarea>
                                            </div>
                                        </div>
                                    </ng-form>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-sm btn-success" ng-click="saveAgent()"
                                        ng-disabled="editForm.$invalid">
                                    <i class="fa fa-save"></i> 保存
                                </button>
                                <button type="button" class="btn btn-sm btn-white" data-dismiss="modal">
                                    <i class="fa fa-share-square-o"></i> 关闭
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

